package kingiis.utils.simpleapp.utils;

/**
 * Created by King on 2017/12/29 0029.
 * 日志打印
 */
public class Log {
    /**
     * 贞操锁
     */
    public static final boolean LOCK = true;
    public static final String tag = "tag";

    public static void i(String string) {
        if (LOCK) {
            if (string.length() > 4000) {
                for (int i = 0; i < string.length(); i += 4000) {
                    if (i + 4000 < string.length()) {
                        Log.i(tag, string.substring(i, i + 4000));
                    } else {
                        Log.i(tag, "→" + string.substring(i, string.length()));
                    }
                }
            } else {
                android.util.Log.i(tag, string);
            }
        }
    }

    public static void i(String tag, String string) {
        if (LOCK) {
            android.util.Log.i(tag, string);
        }
    }
}
